#================================================================
#	This Makefile creates _Kernel.so which can be imported by Python
#================================================================

include ../makefile.inc

Kernel_module = Kernel

OBJ_of_Kernel_module = All_files_at_once.o

OLD_OBJ_of_Kernel_module = \
	Kernel_module.o \
	Py_Aff_transformation_2.o\
	Py_Aff_transformation_3.o\
	Py_Circle_2.o\
	Py_Direction_2.o\
	Py_Direction_3.o\
	Py_Enumerations.o\
	Py_Global_variables.o\
	Py_Iso_cuboid_3.o\
	Py_Iso_rectangle_2.o\
	Py_Line_2.o\
	Py_Line_3.o\
	Py_Plane_3.o\
	Py_Point_2.o\
	Py_Point_3.o\
	Py_Ray_2.o\
	Py_Ray_3.o\
	Py_Segment_2.o\
	Py_Segment_3.o\
	Py_Sphere_3.o\
	Py_Tetrahedron_3.o\
	Py_Triangle_2.o\
	Py_Triangle_3.o\
	Py_Vector_2.o\
	Py_Vector_3.o \
	Py_global_functions_2.o \
	Py_global_functions_3.o \
	Py_Bbox_2.o \
	Py_Bbox_3.o 

all: $(OBJ_of_Kernel_module) 
	@echo 'Creating a Python modules'
	@g++ $(CGAL_PYTHON_LDFLAGS) $(OBJ_of_Kernel_module)  -o $(Kernel_module).so
	@echo 'Kernel is created in ./$(Kernel_module)/'

.cpp.o:
	@echo 'Compiling $<'
	@g++ $(CGAL_PYTHON_CXXFLAGS) -c $<

clean:
	@rm -f *.so
	@rm -f $(OBJ_of_Kernel_module) *.*~  *~ 
